<?php
require_once 'choce1/address.php';
	class Customer{
		private $id;
		private $name;
		private $type;
		private $address = array();
		public function __construct($id,$name,$type){
			$this->id =$id;
			$this->name =$name;
			$this->type =$type;
		}
		public function __get($data){
			return $this->$data;
		}
		public function __set($data,$value){
			$this->$data=$value;
		}
		public function add($ObjectAddress){
			$this->address[] = $ObjectAddress;
		}
		public function getObjectAddress(){
			for ($i=0;$i<sizeof($this->address);$i++){
				echo 'ข้อมูลที่อยู่ '.($i+1).':  '.$this->address[$i]->address."<br>";
			}
		}
		public function getType($type){
			if($type==1){
				$text = ')';
			}else{
				$text = ')';
			}
			return $text;
		}
	}
?>